<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>文档-基础配置 | Perfree</title>
    <meta name="description" content="">
    <meta name="generator" content="VuePress 1.8.2">
    <link rel="icon" href="/assets/favicon.ico">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.slim.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.2/jquery.fancybox.min.js"></script>
    <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.2/jquery.fancybox.min.css">
    <meta name="description" content="Java开发的建站平台">
    <link rel="preload" href="/assets/css/0.styles.53214819.css" as="style"><link rel="preload" href="/assets/js/app.94968a94.js" as="script"><link rel="preload" href="/assets/js/2.fdc7bca3.js" as="script"><link rel="preload" href="/assets/js/8.a73d51d6.js" as="script"><link rel="prefetch" href="/assets/js/10.0ff33afc.js"><link rel="prefetch" href="/assets/js/11.c36dbcc6.js"><link rel="prefetch" href="/assets/js/12.92c9567c.js"><link rel="prefetch" href="/assets/js/13.c09257d0.js"><link rel="prefetch" href="/assets/js/14.715bbb46.js"><link rel="prefetch" href="/assets/js/15.e222f376.js"><link rel="prefetch" href="/assets/js/16.bb221be4.js"><link rel="prefetch" href="/assets/js/17.cda3dfb0.js"><link rel="prefetch" href="/assets/js/18.e2582183.js"><link rel="prefetch" href="/assets/js/3.f4d43266.js"><link rel="prefetch" href="/assets/js/4.e03bce9c.js"><link rel="prefetch" href="/assets/js/5.cf1c3294.js"><link rel="prefetch" href="/assets/js/6.d12ee77a.js"><link rel="prefetch" href="/assets/js/7.e7442db3.js"><link rel="prefetch" href="/assets/js/9.169d2690.js">
    <link rel="stylesheet" href="/assets/css/0.styles.53214819.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="ant-row"><div class="sidebar-button"><i aria-label="icon: bars" class="anticon anticon-bars"><svg viewBox="0 0 1024 1024" focusable="false" data-icon="bars" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 1 0 112 0 56 56 0 1 0-112 0zm0 284a56 56 0 1 0 112 0 56 56 0 1 0-112 0zm0 284a56 56 0 1 0 112 0 56 56 0 1 0-112 0z"></path></svg></i> <span></span></div> <div class="ant-col ant-col-xs-24 ant-col-sm-24 ant-col-md-6 ant-col-lg-5 ant-col-xl-5 ant-col-xxl-4"><a href="/" class="router-link-active home-link"><img src="/assets/logo.png" alt="Perfree" class="logo"> <span class="site-name">Perfree</span></a> <div class="search-box mobile-search"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div></div> <div class="ant-col ant-col-xs-0 ant-col-sm-0 ant-col-md-18 ant-col-lg-19 ant-col-xl-19 ant-col-xxl-20"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><ul role="menu" id="nav" class="ant-menu ant-menu-horizontal ant-menu-root ant-menu-light"><li role="menuitem" class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu" style="display:none;"><div aria-haspopup="true" class="ant-menu-submenu-title"><span>···</span><i class="ant-menu-submenu-arrow"></i></div></li><li role="menuitem" class="ant-menu-item"><a href="/" class="router-link-active">
          首页
        </a></li><li role="menuitem" class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu" style="display:none;"><div aria-haspopup="true" class="ant-menu-submenu-title"><span>···</span><i class="ant-menu-submenu-arrow"></i></div></li><li role="menuitem" class="ant-menu-item"><a href="/doc/update-record.html">
          更新日志
        </a></li><li role="menuitem" class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu" style="display:none;"><div aria-haspopup="true" class="ant-menu-submenu-title"><span>···</span><i class="ant-menu-submenu-arrow"></i></div></li><li role="menuitem" class="ant-menu-item ant-menu-item-selected"><a href="/doc/" class="router-link-active">
          文档
        </a></li><li role="menuitem" class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu" style="display:none;"><div aria-haspopup="true" class="ant-menu-submenu-title"><span>···</span><i class="ant-menu-submenu-arrow"></i></div></li><li role="menuitem" class="ant-menu-item"><a href="/theme-download/">
          主题下载
        </a></li><li role="menuitem" class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu" style="display:none;"><div aria-haspopup="true" class="ant-menu-submenu-title"><span>···</span><i class="ant-menu-submenu-arrow"></i></div></li><li role="menuitem" class="ant-menu-item"><a href="/theme-develop/">
          主题开发
        </a></li><li role="menuitem" class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu" style="visibility:hidden;position:absolute;"><div aria-haspopup="true" class="ant-menu-submenu-title"><span>···</span><i class="ant-menu-submenu-arrow"></i></div></li></ul> <a href="https://github.com/perfree/PerfreeBlog" target="_blank" rel="noopener noreferrer" class="repo-link"><i aria-label="icon: github" class="anticon anticon-github"><svg viewBox="64 64 896 896" focusable="false" data-icon="github" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0 1 38.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"></path></svg></i></a></nav></div></div> <!----></header> <aside class="sidebar"><!----> <ul class="sidebar-links"><li><a href="/doc/" aria-current="page" title="项目介绍" class="sidebar-link">项目介绍</a></li><li><a href="/doc/install-linux.html" title="Linux安装" class="sidebar-link">Linux安装</a></li><li><a href="/doc/install-windows.html" title="Windows安装" class="sidebar-link">Windows安装</a></li><li><a href="/doc/install-docker.html" title="Docker安装" class="sidebar-link">Docker安装</a></li><li><a href="/doc/install-config.html" aria-current="page" title="基础配置" class="active sidebar-link">基础配置</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/doc/install-config.html#目录结构" title="目录结构" class="sidebar-link">目录结构</a></li><li class="sidebar-sub-header"><a href="/doc/install-config.html#端口号" title="端口号" class="sidebar-link">端口号</a></li><li class="sidebar-sub-header"><a href="/doc/install-config.html#数据库信息" title="数据库信息" class="sidebar-link">数据库信息</a></li></ul></li><li><a href="/doc/install-update.html" title="更新教程" class="sidebar-link">更新教程</a></li><li><a href="/doc/update-record.html" title="更新日志" class="sidebar-link">更新日志</a></li></ul></aside> <main class="page"> <div class="theme-antdocs-content content__default"><h2 id="目录结构"><a href="#目录结构" class="header-anchor">#</a> 目录结构</h2> <p>PerfreeBlog的安装目录结构如下:</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>perfree-web  <span class="token comment"># 安装目录</span>
├── config  <span class="token comment"># 配置文件目录</span>
│    └── application.yml  <span class="token comment"># 配置文件</span>
├── logs  <span class="token comment"># 日志输出目录</span>
├── perfree-web.jar  <span class="token comment"># jar包</span>
├── resources  <span class="token comment"># 资源目录</span>
│   ├── db  <span class="token comment"># 数据库目录(如果使用mysql数据库,则没有此目录)</span>
│   │   └── perfree.db  <span class="token comment"># sqlite数据库</span>
│   ├── db.properties  <span class="token comment"># 数据库连接信息配置</span>
│   ├── Perfree-sqlite.sql  <span class="token comment"># sqlite初始化脚本</span>
│   ├── Perfree.sql  <span class="token comment"># mysql初始化脚本</span>
│   ├── plugins  <span class="token comment"># 插件目录</span>
│   └── static  <span class="token comment"># 静态资源目录</span>
│       ├── admin  <span class="token comment"># 后台管理相关页面</span>
│       ├── public  <span class="token comment"># 公共的静态资源</span>
│       └── themes  <span class="token comment"># 主题</span>
├── start.bat  <span class="token comment"># win启动脚本</span>
└── start.sh   <span class="token comment"># Linux启动脚本</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br></div></div><h2 id="端口号"><a href="#端口号" class="header-anchor">#</a> 端口号</h2> <p>PerfreeBlog默认端口号为8080,如需修改则可以打开安装目录内config/application.yml对port进行修改</p> <div class="language-yaml line-numbers-mode"><pre class="language-yaml"><code><span class="token key atrule">server</span><span class="token punctuation">:</span>
  <span class="token comment"># 端口</span>
  <span class="token key atrule">port</span><span class="token punctuation">:</span> <span class="token number">8080</span>

<span class="token comment"># 默认文件上传地址</span>
<span class="token key atrule">web.upload-path</span><span class="token punctuation">:</span> resources/upload/
<span class="token key atrule">spring</span><span class="token punctuation">:</span>
  <span class="token key atrule">devtools</span><span class="token punctuation">:</span>
    <span class="token key atrule">restart</span><span class="token punctuation">:</span>
      <span class="token key atrule">enabled</span><span class="token punctuation">:</span> <span class="token boolean important">false</span>
  <span class="token key atrule">servlet</span><span class="token punctuation">:</span>
    <span class="token key atrule">multipart</span><span class="token punctuation">:</span>
      <span class="token comment"># 单个文件上传允许最大大小,默认-1为不限制,如需限制大小改为具体的大小即可,如100MB</span>
      <span class="token key atrule">max-file-size</span><span class="token punctuation">:</span> <span class="token number">-1</span>
      <span class="token comment"># 总上传的数据大小,默认-1为不限制,如需限制大小改为具体的大小即可,如100MB</span>
      <span class="token key atrule">max-request-size</span><span class="token punctuation">:</span> <span class="token number">-1</span>

<span class="token key atrule">logging</span><span class="token punctuation">:</span>
  <span class="token key atrule">level</span><span class="token punctuation">:</span>
    <span class="token key atrule">com.perfree</span><span class="token punctuation">:</span> error
  <span class="token key atrule">file</span><span class="token punctuation">:</span>
    <span class="token comment"># 日志文件输出路径</span>
    <span class="token key atrule">name</span><span class="token punctuation">:</span> ./logs/Perfree.log
    <span class="token comment"># 日志最多保存多少天</span>
    <span class="token key atrule">max-history</span><span class="token punctuation">:</span> <span class="token number">7</span>
    <span class="token comment"># 单个日志文件最大大小</span>
    <span class="token key atrule">max-size</span><span class="token punctuation">:</span> 10MB
<span class="token key atrule">cache</span><span class="token punctuation">:</span>
  <span class="token key atrule">ehcache</span><span class="token punctuation">:</span>
    <span class="token key atrule">config</span><span class="token punctuation">:</span> ehcache.xml
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br></div></div><h2 id="数据库信息"><a href="#数据库信息" class="header-anchor">#</a> 数据库信息</h2> <p>如需更换数据库密码/信息等操作,可以安装目录内resources/db.properties进行修改</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token comment">#Sat Dec 26 20:24:40 CST 2020</span>
<span class="token assign-left variable">url</span><span class="token operator">=</span>jdbc<span class="token punctuation">\</span>:sqlite<span class="token punctuation">\</span>:resources/db/perfree.db?date_string_format<span class="token punctuation">\</span><span class="token operator">=</span>yyyy-MM-dd HH<span class="token punctuation">\</span>:mm<span class="token punctuation">\</span>:ss
<span class="token assign-left variable">driverClassName</span><span class="token operator">=</span>org.sqlite.JDBC
<span class="token assign-left variable">type</span><span class="token operator">=</span>sqlite
<span class="token assign-left variable">installStatus</span><span class="token operator">=</span>success
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">Last Updated:</span> <span class="time">8/11/2021, 3:43:19 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev"><a href="/doc/install-docker.html" class="prev"><i aria-label="icon: left" class="anticon anticon-left"><svg viewBox="64 64 896 896" focusable="false" data-icon="left" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"></path></svg></i>
        Docker安装
      </a></span> <span class="next"><a href="/doc/install-update.html">
        更新教程
        <i aria-label="icon: right" class="anticon anticon-right"><svg viewBox="64 64 896 896" focusable="false" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"></path></svg></i></a></span></p></div> </main> <!----></div><div class="global-ui"></div></div>
    <script src="/assets/js/app.94968a94.js" defer></script><script src="/assets/js/2.fdc7bca3.js" defer></script><script src="/assets/js/8.a73d51d6.js" defer></script>
  </body>
</html>